package com.edou.cms.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

import com.edou.cms.entity.CmsBlogAuthorTag;
import com.edou.cms.dto.CmsBlogAuthorTagCondition;

@Repository("cmsBlogAuthorTagDaoImpl")
public interface ICmsBlogAuthorTagDao {

	/**
	 * 查询区间数据
	 * @param bounds RowBounds对象
	 * @param condition 查询条件类
	 */
	List<CmsBlogAuthorTag> listCmsBlogAuthorTagByPage(RowBounds bounds,@Param("condition") CmsBlogAuthorTagCondition condition);

	/**
	 * 查询总数
	 * @param condition 查询条件类
	 * @return 总条数
	 */
	int listCmsBlogAuthorTagByPageCount(@Param("condition") CmsBlogAuthorTagCondition condition);

	/**
	 * 根据ID查询
	 * @param id 主键
	 * @return 博主与标签关联表
	 */
	CmsBlogAuthorTag getCmsBlogAuthorTagById(@Param("id") String id);

	/**
	 * 新增
	 * @param item 博主与标签关联表
	 */
	void add(CmsBlogAuthorTag item);

	/**
	 * 修改
	 * @param item 博主与标签关联表
	 */
	void update(CmsBlogAuthorTag item);

	/**
	 * 根据ID集合批量删除
	 * @param ids ID集合
	 */
	void delByIds(String[] ids);

	/**
	 * 根据博主Id查询标签的集合
	 * @param authorId
	 * @return
	 */
	List<CmsBlogAuthorTag> listCmsBlogAuthorTagByAuthorId(@Param("authorId") String authorId);
	
	/**
	 * 根据博主id删除标签
	 * @param articleId
	 */
	void delByAuthorId(@Param("authorId")String authorId);
	
}

